package com.qf;

import com.qf.pojo.Student;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 *
 * 引导类（起步类）
 *
 * @SpringBootApplication： 标记在 引导类上
 *          作用：自动创建对象
 * @author 千锋教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
@SpringBootApplication
public class SpringBootApplicationHelloWorld {


    public static void main(String[] args) {
        //创建容器，启动项目
        ConfigurableApplicationContext ac = SpringApplication.run(SpringBootApplicationHelloWorld.class, args);

//        User user = ac.getBean(User.class);
//        System.out.println(user);

        Student student = ac.getBean(Student.class);
        System.out.println(student);
    }
}
